<?php get_header(); ?>
<!--Mirages-->
<div id="header" style="background-image: 
url(<?php echo get_option('header_logo_image'); ?>)">
	
		<div class="header-background-color">
			<div class="header-text">
<!--首页标题-->
				<h1><?php echo get_theme_mod( 'home_title', 'Mirages-Test' ); ?></h1>
				
<!--首页副标题-->
				<h2><?php echo get_theme_mod( 'header_sub', 'Mirages For Wordpress' ); ?></h2>
				
			</div>
		</div>
	</div>
<!--博文内容外框-->
<div class="index-box">
		<?php
			if( have_posts() ){
				while( have_posts() ){
				//获取下一篇文章的信息，并且将信息存入全局变量 $post 中
				the_post();
				?>					
	<!---->
				<div class="index-text-box" style="background-image: url(<?php
					$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');
					echo $full_image_url[0];?>); ">
					<div class="index-content">
						<div class="index-text">	
<!--博文页标题：https://www.npc.ink/2921.html-->
				<div class="index-title">
				<a href="<?php the_permalink(); ?>">
					<?php echo wp_trim_words( get_the_title(), 30 ); // 文章标题?>
					</a>
					</div>
								<div class="index-meat">
								<!--创建博文时间：-->
							<a><?php the_time( 'Y.m.d' ); ?>&nbsp;&nbsp;•&nbsp;&nbsp;</a>
							<!--类别：-->
							<?php the_category(','); ?>
								</div>
								</div>
						</div>
</div>
					<?php
				}
			}else{
				echo '没有博文可以显示';
			}
		?>
							
		<!--底部分页按钮-->
	<div class="index-button">
		<div class="index-button-next">
			 <?php posts_nav_link( "&nbsp;&nbsp;&nbsp;&nbsp;", "上一页" ); ?>
			</div>
		</div>
</div>
<?php get_footer(); ?>